package servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import pojo.Merchant;

public class ChooseTypeServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
    public ChooseTypeServlet() {
        super();
    }
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		String typeId = request.getParameter("typeId");
		String currold = request.getParameter("curr");
		String m_name = request.getParameter("m_name");
		request.setAttribute("typeId", typeId);
		request.setAttribute("m_name", m_name);
		if(currold != null)
			request.setAttribute("curr", Integer.parseInt(currold));
		else{
			request.setAttribute("curr",1);
		}
		request.getRequestDispatcher("showFoodList").forward(request, response);
	}
}
